package com.springboot.cloud.seckill.service;

import com.springboot.cloud.seckill.entity.SeckillActivity;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;

import java.util.List;
import java.util.Optional;

/**
 * @author godyao
 * @date 2022/3/26
 */
public interface ISeckillAdminService {

    /**
     * 添加活动
     * @param seckillActivity
     * @return
     */
    SeckillActivity addActivity(SeckillActivity seckillActivity);

    /**
     * 更新活动
     * @param seckillActivity
     * @return
     */
    SeckillActivity updateActivity(SeckillActivity seckillActivity);

    /**
     * 查询活动
     * @param id
     * @return
     */
    Optional queryActivityById(Long id);

    /**
     * 查询所有活动
     * @return
     */
    Page<SeckillActivity> queryActivity(PageRequest pageRequest);

    /**
     * 删除活动
     * @param id
     */
    void deleteActivity(Long id);


}
